﻿<%@ Page Title="Explorar Entidades" Language="C#" MasterPageFile="~/MasterPage.master"
	AutoEventWireup="true" CodeFile="BrowseEnterprises.aspx.cs" Inherits="Enterprise_BrowseEnterprises" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="ESF.Web" Namespace="ESF.Web.ServerControls" TagPrefix="esf" %>
<asp:Content ID="cntContenido" ContentPlaceHolderID="cntContenido" runat="Server">
	<asp:Panel ID="pnlForm" CssClass="divForm" runat="server" DefaultButton="btnBrowse">
		<div class="header">
			<div class="icon">
			</div>
			<div class="title">
				<asp:Label ID="lblTitle" runat="server"></asp:Label>
			</div>
		</div>
		<asp:UpdatePanel ID="updFields" runat="server" UpdateMode="Conditional">
			<Triggers>
				<asp:AsyncPostBackTrigger ControlID="btnClear" />
			</Triggers>
			<ContentTemplate>
				<div class="divField divField_half">
					<div class="label">
						Tipo Identificación
					</div>
					<div class="field">
						<asp:DropDownList ID="ddlIdentificationType" Width="210px" runat="server">
						</asp:DropDownList>
					</div>
				</div>
				<div class="divField divField_half">
					<div class="label">
						Número Identificación
					</div>
					<div class="field">
						<asp:TextBox ID="txtIdentificationNumber" runat="server" CssClass="W150" MaxLength="30"></asp:TextBox>
					</div>
				</div>
				<div class="divField">
					<div class="label">
						Nombre
					</div>
					<div class="field">
						<asp:TextBox ID="txtName" runat="server" CssClass="W400" MaxLength="500"></asp:TextBox>
					</div>
				</div>
			</ContentTemplate>
		</asp:UpdatePanel>
		<asp:UpdatePanel ID="updOperations" runat="server" UpdateMode="Conditional">
			<ContentTemplate>
				<div class="divOperations">
					<asp:Button ID="btnBrowse" runat="server" Text="Consultar" OnClick="btnBrowse_Click" />
					<asp:Button ID="btnClear" runat="server" Text="Limpiar" UseSubmitBehavior="false"
						CausesValidation="false" OnClick="btnClear_Click" />
					<asp:Button ID="btnDelete" runat="server" Text="Eliminar" UseSubmitBehavior="false"
						ToolTip="Elimina los elementos seleccionados" Enabled="false" CausesValidation="false"
						OnClick="btnDelete_Click" />
					<asp:ConfirmButtonExtender ID="btnDelete_ConfirmButtonExtender" runat="server" ConfirmText="Desea eliminar los elementos seleccionados?"
						Enabled="True" TargetControlID="btnDelete">
					</asp:ConfirmButtonExtender>
					&nbsp;&nbsp;&nbsp;&nbsp;
					<asp:Button ID="btnNew" runat="server" Text="Nuevo" CausesValidation="false" UseSubmitBehavior="false" />
				</div>
			</ContentTemplate>
		</asp:UpdatePanel>
		<asp:UpdatePanel ID="updResults" runat="server" UpdateMode="Conditional">
			<Triggers>
				<asp:AsyncPostBackTrigger ControlID="dpggrvResults" />
				<asp:AsyncPostBackTrigger ControlID="btnBrowse" />
				<asp:AsyncPostBackTrigger ControlID="btnClear" />
				<asp:AsyncPostBackTrigger ControlID="btnDelete" />
			</Triggers>
			<ContentTemplate>
				<esf:DataPagging ID="dpggrvResults" PageSize="20" CssClass="pager" runat="server" Visible="false"
					OnOnPageChanged="dpggrvResults_OnPageChanged" ReplicatePaggingControlIDs="dpggrvResults_footer" />
				<asp:GridView ID="grvResults" runat="server" AutoGenerateColumns="False" OnRowDataBound="grvResults_RowDataBound">
					<Columns>
						<asp:TemplateField HeaderText="Sel." HeaderStyle-HorizontalAlign="Center">
							<HeaderTemplate>
								<asp:CheckBox ID="chkSelectAll" runat="server" AutoPostBack="true" OnCheckedChanged="chkSelectAll_CheckedChanged" />
							</HeaderTemplate>
							<ItemTemplate>
								<asp:HiddenField ID="hidItemID" runat="server" />
								<asp:CheckBox ID="chkSelect" runat="server" />
							</ItemTemplate>
						</asp:TemplateField>
						<asp:BoundField ItemStyle-Width="120" DataField="Code" HeaderText="Sigla" />
						<asp:HyperLinkField ItemStyle-Width="484" DataNavigateUrlFields="ID" DataNavigateUrlFormatString="EditEnterprise.aspx?ItemID={0}"
							DataTextField="Name" HeaderText="Nombre" />
						<asp:TemplateField HeaderText="Tipo ID." ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
							<ItemTemplate>
								<asp:Label ID="lblIdentificationTypeCode" runat="server"></asp:Label>
							</ItemTemplate>
						</asp:TemplateField>
						<asp:TemplateField HeaderText="Núm. Identificación" ItemStyle-Width="140px" ItemStyle-HorizontalAlign="Center">
							<ItemTemplate>
								<asp:Label ID="lblIdentificationNumber" runat="server"></asp:Label>
							</ItemTemplate>
						</asp:TemplateField>
						<asp:CheckBoxField DataField="IsEnabled" ItemStyle-HorizontalAlign="Center" HeaderText="Habilitado"
							ItemStyle-Width="70px" ReadOnly="True" />
					</Columns>
				</asp:GridView>
				<esf:DataPagging ID="dpggrvResults_footer" MasterDataPaggingControlID="dpggrvResults" CssClass="pager" runat="server" />
			</ContentTemplate>
		</asp:UpdatePanel>
	</asp:Panel>
</asp:Content>
